package com.git.plane;

import java.awt.image.BufferedImage;

/**
 * 定义飞行物类
 * 
 * @author lichao
 *
 * @date 2016年3月14日
 */
public abstract class FlyingObject {
	protected int x;// 物体的x坐标
	protected int y;// 物体的y坐标
	protected int width;// 物体的宽
	protected int height;// 物体的高
	protected BufferedImage image;// 物体的图像

	public FlyingObject(int x, int y, int width, int height, BufferedImage image) {
		super();
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;
		this.image = image;
	}

	/**
	 * 飞行物的移动方法
	 */
	abstract void step();

	public FlyingObject() {
		super();
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public BufferedImage getImage() {
		return image;
	}

	public void setImage(BufferedImage image) {
		this.image = image;
	}

}
